package com.example.wan_android.ui.activity

import com.example.wan_android.BR
import com.example.wan_android.R
import com.example.wan_android.databinding.ActivityLaunchBinding
import com.example.wan_android.tools.Sp
import com.example.wan_android.viewmodel.LaunchViewModel

class LaunchActivity : BaseActivity<ActivityLaunchBinding, LaunchViewModel>(
    LaunchViewModel::class.java,
    R.layout.activity_launch,
    BR.viewModel
) {
    override fun initView() {
        mViewModel?.simulateLoading()
        Sp.getSharedPrefs(this)
        val number = Sp.getString(this, "userName", "")
        val password = Sp.getString(this, "password", "")
        mViewModel?.login(number ?: "", password ?: "")

    }
}